<template>
  <div>
    <!-- <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>{{currentProject.name}}（项目代码：{{currentProject.code}}）</el-breadcrumb-item>
    </el-breadcrumb> -->
    <el-page-header @back="$router.push('/')" :content="pageName + '（' + currentProject.name + '）'">
    </el-page-header>
  </div>
</template>

<script>
  export default {
    props:["pageName"],
    data() {
      return {
        currentProject: {}
      }
    },
    created() {
      if(this.$route.path == '/projectResult' && !sessionStorage.getItem('currentProject')){
        this.$router.push('/')
      }
      else if (!sessionStorage.getItem('e_id') && this.$route.path != '/projectResult') {
        this.$router.push('/')
      } else {
        // console.log(sessionStorage)
        this.currentProject = JSON.parse(sessionStorage.getItem('currentProject'));
      }
    }
  }
</script>

<style scoped lang="scss">
  .el-page-header{
    height: 50px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
    line-height: 50px;
    background-color: #f6f6f6;
  }
  @media print {
    .el-page-header{
      display: none;
    }
  }
</style>
